<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>在线报名</title>
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<script type="text/javascript">
		//手机适配
		var cssEl=document.createElement("style");
		document.documentElement.firstElementChild.appendChild(cssEl);
		function setPxPerRem(){
			var dpr=1;
			var pxPerRem=document.documentElement.clientWidth*dpr/10;
			if(pxPerRem>60){
				pxPerRem=60;
			}
			cssEl.innerHTML='html{font-size:'+pxPerRem+'px!important;}';
		}
		setPxPerRem();
		//手机适配结束
	</script>
	<link rel="stylesheet" type="text/css" href="css/swiper-3.3.1.min.css">
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/onlinereg.css">
</head>
<body>
<!-- 	<header>
	<img src="images/common/top.jpg" width="100%">
</header> -->
	<header class="top-d">
		<h1><img src="images/home/logo.png"></h1>
		<a href="javascript:void(0);" class="h-list-btn"></a>
	</header>
	<section class="nav-list">
		<a href="index.html">首页</a>
		<a href="">iOS培训课程</a>
		<a href="android.html">Android培训课程</a>
		<a href="html5.html">HTML5培训课程</a>
		<a href="">公开课</a>
		<a href="">企业合作</a>
		<a href="teacher.html">名师堂</a>
		<a href="">关于我们</a>
	</section>

	<section class="h-banner swiper-container">
		<ul class="swiper-wrapper">
			<li class="swiper-slide"><a href=""><img src="images/home/banner1.jpg" width="100%"></a></li>
			<li class="swiper-slide"><a href=""><img src="images/home/banner1.jpg" width="100%"></a></li>
			<li class="swiper-slide"><a href=""><img src="images/home/banner1.jpg" width="100%"></a></li>
		</ul>
		<div class="swiper-pagination"></div>
	</section>
<!-- 表单 -->
	<section class="form-wrap">
		<h3>留下您的联系方式，获取育知最新优惠信息</h3>
		<form action="" onsubmit="return check();">
			<p><input type="text" class="form-txt input-b" id="userName" name="userName" placeholder="姓名"></p>
			<p>
				<input type="number" class="form-txt input-b" id="userTel" name="userTel" placeholder="联系电话">
			</p>
			<p>
				<input type="text" class="form-txt input-b" id="userQQ" name="userQQ" placeholder="QQ">
			</p>
			<p>
				<textarea name="userMessage" class="input-b" id="userMessage" placeholder="留言"></textarea>
			</p>
			<p>
				<input type="submit">
			</p>
		</form>
	</section>
<!-- 表单结束 -->
<!-- 固定导航 -->
	<footer class="base-nav">
		<ul>
			<li>
				<a href="javascript:void(0);">摇一摇</a>
			</li>
			<li>
				<a href="tel:400-654-7778">免费电话</a>
			</li>

			<li>
				<a href="http://www15.53kf.com/webCompany.php?arg=10128219&amp;style=1">在线咨询</a>
			</li>
			<li>
				<a href="http://www15.53kf.com/webCompany.php?arg=10128219&amp;style=1">免费试听</a>
			</li>
		</ul>
	</footer>
<!-- 固定导航结束 -->

	<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
	<script type="text/javascript" src="js/swiper-3.3.1.jquery.min.js"></script>
	<script type="text/javascript" src="js/yaoyiyao.js"></script>	
		<!--导航显示隐藏-->
	<script type="text/javascript">
		$(".h-list-btn").on("click",function(){
			$(".nav-list").slideToggle();
		});
	</script>

	<script> 
		var mySwiper = new Swiper('.swiper-container', {
			autoplay: 5000,//可选选项，自动滑动
			loop : true,
			pagination : '.swiper-pagination',
			initialSlide :0,
			autoplayDisableOnInteraction : false
		})   //轮播图
	</script>
	<script type="text/javascript">
		/*表单验证*/
		$(".input-b").blur(function(){
			var $parent=$(this).parent();
			    $parent.find(".formtips").remove();

			   	//用户名验证
				if($(this).is("#userName")){
					if(this.value==""){
	 					var errorMsg = '用户名不能为空';
	                     $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
					}
				}
				//手机号验证
				if($(this).is("#userTel")){

					if(this.value==""){
						errorMsg="手机号不能为空";
						$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
					}else if(!(/^1\d{10}$/.test(this.value))){
						errorMsg="手机号有误，请重填";	
						$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
					}				
				}

				//QQ验证
				if($(this).is("#userQQ")){
					if(this.value==""){
						errorMsg="QQ不能为空";
						$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
					}
				}
				//QQ验证
				if($(this).is("#userMessage")){
					if(this.value==""){
						errorMsg="留言不能为空";
						$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
					}
				}	
		});

		function check(){
			$(".input-b").trigger("focus");
			var numError=$('form .onError').length;
			if(numError){
				return false;
			}
			alert("成功报名");
		}

	</script>
	<script>
(function() {
  var _53code = document.createElement("script");
  _53code.src = "//tb.53kf.com/code/code/10128219/1";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(_53code, s);
})();
</script>
</body>
</html>